Skip to content

Conversation

@Paillat-dev
Copy link
Member

Summary

Depends on: #2645
The above pull request is required as it refactors asyncio usage in a way that does not make use of deprecated methods. See: https://docs.python.org/3.14/whatsnew/3.14.html#deprecated

⚠️ This requires testing.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@pycord-app
Copy link

pycord-app bot commented Oct 9, 2025

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/2948/head:pr-2948
git checkout pr-2948

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/2948/head

@Paillat-dev Paillat-dev added hold: testing This pull request requires further testing hold: changelog This pull request is missing a changelog entry priority: medium Medium Priority labels Oct 9, 2025
@Paillat-dev Paillat-dev changed the title Feat/python 3.14 feat: ✨ Update to support python 3.14 Oct 9, 2025
@Paillat-dev Paillat-dev added the dependencies Pull requests that update a dependency file label Oct 9, 2025
@NeloBlivion
Copy link
Member

Does this require anything beyond #2645?

@Lulalaby Lulalaby marked this pull request as draft October 20, 2025 10:41
@Lulalaby
Copy link
Member

Drafting

Signed-off-by: Lala Sabathil <lala@pycord.dev>
@Paillat-dev
Copy link
Member Author

Does this require anything beyond #2645?

Maybe stuff related to voice idk

@Lulalaby
Copy link
Member

Lulalaby commented Oct 21, 2025

I put that on hold for the next release

Signed-off-by: Lala Sabathil <lala@pycord.dev>
Signed-off-by: Lala Sabathil <lala@pycord.dev>
@Lulalaby Lulalaby added this to the v2.7 milestone Nov 1, 2025
@github-project-automation github-project-automation bot moved this to In Progress in Pycord Releases Nov 1, 2025
@Lulalaby Lulalaby removed on hold hold: changelog This pull request is missing a changelog entry hold: testing This pull request requires further testing labels Nov 1, 2025
@Lulalaby Lulalaby marked this pull request as ready for review November 1, 2025 14:16
@Lulalaby Lulalaby marked this pull request as draft November 1, 2025 14:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Python 3.14 by updating version constraints, classifiers, CI configurations, and documentation across the project.

  • Updated Python version support from <3.14 to <3.15 in project configuration
  • Added Python 3.14 to CI/CD workflows for testing and releases
  • Updated documentation to reflect new version support

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pyproject.toml Updated requires-python constraint to include 3.14, added 3.14 classifier, and added py314 to Black target versions
README.rst Updated documentation to indicate Python 3.14 support
CHANGELOG.md Added changelog entry documenting Python 3.14 support
.github/workflows/release.yml Updated release workflow to use Python 3.14
.github/workflows/lib-checks.yml Added Python 3.14 to test matrix and updated linting jobs to use 3.14

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Paillat-dev
Copy link
Member Author

w/out #2645:

Traceback (most recent call last):
  File "/home/paillat/Documents/pycord/pycord/test_simple.py", line 11, in <module>
    bot = discord.Bot()
  File "/home/paillat/Documents/pycord/pycord/discord/bot.py", line 1171, in __init__
    super().__init__(*args, **options)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/paillat/Documents/pycord/pycord/discord/bot.py", line 97, in __init__
    super().__init__(*args, **kwargs)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/paillat/Documents/pycord/pycord/discord/cog.py", line 646, in __init__
    super().__init__(*args, **kwargs)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/paillat/Documents/pycord/pycord/discord/client.py", line 250, in __init__
    asyncio.get_event_loop() if loop is None else loop
    ~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/paillat/.local/share/uv/python/cpython-3.14.0-linux-x86_64-gnu/lib/python3.14/asyncio/events.py", line 715, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
                       % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.

w/ #2645:


INFO:discord.client:logging in using static token
INFO:discord.gateway:Shard ID None has sent the IDENTIFY payload.
INFO:discord.gateway:Shard ID None has connected to Gateway: ["gateway-prd-arm-us-east1-b-gdz6",{"micros":439333,"calls":["id_created",{"micros":606,"calls":[]},"session_lookup_time",{"micros":3594,"calls":[]},"session_lookup_finished",{"micros":11,"calls":[]},"discord-sessions-prd-2-124",{"micros":434230,"calls":["start_session",{"micros":419304,"calls":["discord-api-rpc-75d66748db-ltmwx",{"micros":410441,"calls":["get_user",{"micros":10603},"get_guilds",{"micros":28160},"send_scheduled_deletion_message",{"micros":16},"guild_join_requests",{"micros":32431},"authorized_ip_coro",{"micros":14},"pending_payments",{"micros":692},"apex_experiments",{"micros":5},"user_activities",{"micros":3},"played_application_ids",{"micros":3},"linked_users",{"micros":2}]}]},"starting_guild_connect",{"micros":77,"calls":[]},"presence_started",{"micros":644,"calls":[]},"guilds_started",{"micros":105,"calls":[]},"lobbies_started",{"micros":1,"calls":[]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":14069,"calls":[]},"connect_finished",{"micros":14077,"calls":[]},"build_ready",{"micros":19,"calls":[]},"clean_ready",{"micros":1,"calls":[]},"optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":1,"calls":[]}]}]}] (Session ID: fe1af9de6dacae0ee1ec47e85604b190).
Logged in as Test BOT 2#7657 (ID: 1175074550820634714)
------
Test Code
import discord
import os
from dotenv import load_dotenv
import logging

logging.basicConfig(level=logging.INFO)

load_dotenv()

bot = discord.Bot()


class MyCog(discord.Cog):
    @discord.Cog.listener()
    async def on_ready(self):
        print(f"Logged in as {bot.user} (ID: {bot.user.id})")
        print("------")


bot.add_cog(MyCog())

bot.run(os.getenv("TOKEN_2"))

CC @Lulalaby

@Lulalaby
Copy link
Member

Lulalaby commented Nov 2, 2025

gotcha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file priority: medium Medium Priority

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants